package com.ndp.fb.fbagent.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ndp.fb.fbagent.service.ProductSetFBService;
import com.ndp.fb.model.fbagent.param.product.ProductSetParam;
import com.restfb.Parameter;

/**
 * Created by Evan on 2016/4/15.
 */
@Service
public class ProductSetFBServiceImpl extends AbstractFBagentService implements ProductSetFBService {

	@Override
	public void createProductSet(ProductSetParam param) {
		String url = "/" + param.getProductCatalogId() + "/product_sets";
        Parameter[] parameters = this.adapterArray(param);
        makePostRequest(url, param.getAccessToken(), parameters);
	}

	@Override
	public void updateProductSet(ProductSetParam param) {
		String url = "/" + param.getProductSetId();
        Parameter[] parameters = this.adapterArray(param);
        makePostRequest(url, param.getAccessToken(), parameters);
	}

}
